#ifndef __LGUILABEL_H__
#define __LGUILABEL_H__

#include "LGUIWindow.h"
#include "LAMEBuffer.h"
#include "LAMEFont.h"

class LGUILabel : public LGUIWindow  
{
  TCHAR *text;
  short16 color;
public:
  LGUILabel(TCHAR *_text, int _x, int _y, short16 _color=0xffff) : LGUIWindow(_x,_y,1,1)
  {
    text=_text; color=_color;
    h=fonts[0].textHeight();
    w=fonts[0].textSize(text);
  }
  virtual void draw(int xoff, int yoff)
  {
    if (isDirty)
    { 
      buffer.drawTextShadow(text,x+xoff,y+yoff,color);
	  h=fonts[0].textHeight();
	  w=fonts[0].textSize(text);
      buffer.addDirtyRect(*this);
      isDirty=false;
    }
  }
  virtual void setText(TCHAR *_text)
  {
    text=_text;
  }
};
#endif //__LGUILABEL_H__